#include <iostream>

class Solution
{
public:
    int main()
    {
        int a,b,c;
        std::cin >> a >> b >> c;
        std::cout << a / 10 * 2 + b / 10 * 3 + c / 10 * 5;
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif